3.86 \(\int \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx\)

Optimal. Leaf size=76 \[ \frac {i \sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i (a+i a \tan (c+d x))^{3/2}}{3 a d} \]

[Out]

I*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))*2^(1/2)*a^(1/2)/d-2/3*I*(a+I*a*tan(d*x+c))^(3/2)/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3543, 3480, 206} \[ \frac {i \sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i (a+i a \tan (c+d x))^{3/2}}{3 a d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^2*Sqrt[a + I*a*Tan[c + d*x]],x]

[Out]

(I*Sqrt[2]*Sqrt[a]*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d - (((2*I)/3)*(a + I*a*Tan[c + d*x]
)^(3/2))/(a*d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3480

Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(2*a - x^2), x], x, Sq
rt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0]

Rule 3543

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
(d^2*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e
 + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] &&  !LeQ[m, -1] &&  !(EqQ[m, 2] && EqQ
[a, 0])

Rubi steps

\begin {align*} \int \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx &=-\frac {2 i (a+i a \tan (c+d x))^{3/2}}{3 a d}-\int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=-\frac {2 i (a+i a \tan (c+d x))^{3/2}}{3 a d}+\frac {(2 i a) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=\frac {i \sqrt {2} \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i (a+i a \tan (c+d x))^{3/2}}{3 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.71, size = 97, normalized size = 1.28 \[ -\frac {i e^{-i (c+d x)} \left (4 e^{3 i (c+d x)}-3 \left (1+e^{2 i (c+d x)}\right )^{3/2} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right ) \sqrt {a+i a \tan (c+d x)}}{3 d \left (1+e^{2 i (c+d x)}\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^2*Sqrt[a + I*a*Tan[c + d*x]],x]

[Out]

((-1/3*I)*(4*E^((3*I)*(c + d*x)) - 3*(1 + E^((2*I)*(c + d*x)))^(3/2)*ArcSinh[E^(I*(c + d*x))])*Sqrt[a + I*a*Ta
n[c + d*x]])/(d*E^(I*(c + d*x))*(1 + E^((2*I)*(c + d*x))))

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 233, normalized size = 3.07 \[ -\frac {6 \, \sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {a}{d^{2}}} \log \left (4 \, {\left ({\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {a}{d^{2}}} + a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - 6 \, \sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {a}{d^{2}}} \log \left (4 \, {\left ({\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {a}{d^{2}}} + a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 16 i \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (3 i \, d x + 3 i \, c\right )}}{12 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(1/2)*tan(d*x+c)^2,x, algorithm="fricas")

[Out]

-1/12*(6*sqrt(2)*(d*e^(2*I*d*x + 2*I*c) + d)*sqrt(-a/d^2)*log(4*((I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt(a/(e^(2*
I*d*x + 2*I*c) + 1))*sqrt(-a/d^2) + a*e^(I*d*x + I*c))*e^(-I*d*x - I*c)) - 6*sqrt(2)*(d*e^(2*I*d*x + 2*I*c) +
d)*sqrt(-a/d^2)*log(4*((-I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(-a/d^2) + a*e^(
I*d*x + I*c))*e^(-I*d*x - I*c)) + 16*I*sqrt(2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(3*I*d*x + 3*I*c))/(d*e^(2*
I*d*x + 2*I*c) + d)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {i \, a \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(1/2)*tan(d*x+c)^2,x, algorithm="giac")

[Out]

integrate(sqrt(I*a*tan(d*x + c) + a)*tan(d*x + c)^2, x)

________________________________________________________________________________________

maple [A]  time = 0.19, size = 58, normalized size = 0.76 \[ -\frac {2 i \left (\frac {\left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}-\frac {a^{\frac {3}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2}\right )}{d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))^(1/2)*tan(d*x+c)^2,x)

[Out]

-2*I/d/a*(1/3*(a+I*a*tan(d*x+c))^(3/2)-1/2*a^(3/2)*2^(1/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2
)))

________________________________________________________________________________________

maxima [A]  time = 0.62, size = 84, normalized size = 1.11 \[ -\frac {i \, {\left (3 \, \sqrt {2} a^{\frac {7}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + 4 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a^{2}\right )}}{6 \, a^{3} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^(1/2)*tan(d*x+c)^2,x, algorithm="maxima")

[Out]

-1/6*I*(3*sqrt(2)*a^(7/2)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(I*a*tan(
d*x + c) + a))) + 4*(I*a*tan(d*x + c) + a)^(3/2)*a^2)/(a^3*d)

________________________________________________________________________________________

mupad [B]  time = 0.22, size = 63, normalized size = 0.83 \[ -\frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}\,2{}\mathrm {i}}{3\,a\,d}+\frac {\sqrt {2}\,\sqrt {-a}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^2*(a + a*tan(c + d*x)*1i)^(1/2),x)

[Out]

(2^(1/2)*(-a)^(1/2)*atan((2^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(2*(-a)^(1/2)))*1i)/d - ((a + a*tan(c + d*x)*
1i)^(3/2)*2i)/(3*a*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \tan ^{2}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))**(1/2)*tan(d*x+c)**2,x)

[Out]

Integral(sqrt(I*a*(tan(c + d*x) - I))*tan(c + d*x)**2, x)

________________________________________________________________________________________